<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>用户信息查询</title>
    <style>
        body { font-family: Arial, sans-serif; margin: 2rem; }
        pre { background: #f4f4f4; padding: 1rem; }
    </style>
</head>
<body>
    <h1>用户信息查询</h1>
    <div>
        <label>查询条数: 
            <input type="number" id="limit" value="5" min="1" max="100">
        </label>
        <button onclick="fetchData()">查询</button>
    </div>
    <pre id="result">点击查询按钮获取数据...</pre>

    <script>
        function fetchData() {
            const limit = document.getElementById('limit').value;
            fetch(`/api/get_info?limit=${limit}`)
                .then(res => res.json())
                .then(data => {
                    document.getElementById('result').textContent = 
                        JSON.stringify(data, null, 2);
                })
                .catch(err => {
                    document.getElementById('result').textContent = 
                        '查询失败: ' + err.message;
                });
        }
    </script>
</body>
</html>